As applications in embedded devices have become more enriched, the increased amount of data being stored and communicated for such applications has become problematic.
A technology has been known that uses a data compression technology to encode data in a lossless manner so that the data amount is reduced in such cases as the above.
Reduction in data brings about the effects of reduction in memory cost, communications cost, and power consumption. It also brings about an effect of speeding up of systems as a whole because a smaller amount of data is transmitted through memory buses and communications lines.
A conventional method of data compression is illustrated in FIG. 1. This method is a substitutional compression method referred to as an LZ77 algorithm, which imposes a lower processing load, enabling data reduction in a reasonable manner. According to this method, repetitive character strings that are as long as possible are detected in a data buffer, and such repetitive strings are encoded on the basis of their positions and the length of the corresponding portion.
Applications consist of instruction codes and data. In instruction code portions, each word is expressed using plural bytes (four bytes, for example). Thus, repetitions are often detected at corresponding positions between words, such as at the first byte or the third byte as illustrated in, for example, FIG. 2. In other words, repetitions are often found at positions corresponding to multiples of 4 in view of relative positions in units of bytes (in the case of four-byte codes).
However, in conventional technologies such as the LZ77 algorithm or the like, processes are performed uniformly on instruction code portions and data portions, preventing effective data compression on the basis of the above regularity.
The technique disclosed in Patent Document 1 described below is characterized in that a repetitive portion having a relative position equal to or lower than a threshold value is encoded with respect to a repetition in which the length of a corresponding portion is “1”, the encoding being performed in a special manner of encoding based on the LZ77 type, where encoding is conducted using the length of a corresponding portion and corresponding positions.
However, this conventional technique does not enable effective compression of applications that consist of both instruction codes and data, although this technique has a function of switching encoding methods in response to the situation.
The technique disclosed in Patent Document 2 described below is characterized in that an analyzer unit detects differences in meanings between the same numerical value strings expressed in bytes (or detects whether such strings are numbers, characters, or the like) so as to detect correspondence, while taking the meanings into consideration in encoding based on the LZ77 type.
However, this conventional technique uses a parser for semasiological analyses before searching for repetitions, and thus imposes heavier burdens and requires parser dictionaries, making itself unsuitable for data compression of applications for mobile devices.    Patent Document 1: Japanese Laid-open Patent Publication No. 2007-37115    Patent Document 2: Japanese Laid-open Patent Publication No. 08-69370